package com.collect.zambia.zhiHelper;

import android.util.Log;

import com.collect.zambia.zhiBean.zhiReceive.ZHIRPerfermanceEntity;

import java.util.Random;

public class ZHIPerfermanceHelper {

    private Random random = new Random();

    public int[] mColorList = {
            0xFF8FE276, 0xFFB587C8, 0xFF1DE9B6, 0xFFE74C3c, 0xFFF39C12
    };

    public static ZHIPerfermanceHelper getInstance() {
        return instance;
    }

    private static final ZHIPerfermanceHelper instance = new ZHIPerfermanceHelper();

    private ZHIRPerfermanceEntity mPerfermanceEntity;

    public ZHIRPerfermanceEntity getPerfermanceEntity() {
        return mPerfermanceEntity;
    }

    public void setPerfermanceEntity(ZHIRPerfermanceEntity mPerfermanceEntity) {
        this.mPerfermanceEntity = mPerfermanceEntity;
    }

    public int getRandomColorInRange() {
        if (random == null) {
            random = new Random();
        }
        int index = random.nextInt(mColorList.length);
        if (mColorList.length < index) {
            index = 0;
        }
//        int ci = Color.parseColor(mColorList[index]);
        Log.d("", "getRandomColorInRange: "+mColorList[index]);
        return mColorList[index];
    }

}
